﻿using System;
using System.Collections.Generic;
using System.Text;
using NExt.core;

namespace NExt.util
{
    public class MixedCollection : MixedCollection<MixedCollectionEvents>
    {
        public MixedCollection()
        {
            //TODO: assign xtype
        }
    }

    public abstract class MixedCollection<TEvents>: Observable<TEvents>
        where TEvents: MixedCollectionEvents, new()
    {
        public MixedCollection()
        {
            items = new List<object>();
        }

        public IList<object> items { get; set; }
    }

    public class MixedCollectionEvents : ObservableEvents
    {
        public IScript add { get; set; }
        public IScript clear { get; set; }
        public IScript remove { get; set; }
        public IScript replace { get; set; }
    }
}
